package org.jet.emall.prod.transfer;

import org.jet.emall.prod.dto.CustomerAddrDTO;
import org.jet.emall.prod.po.CustomerAddr;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author xiaozai
 * @version 1.0
 * @date 2020-04-28 17:03
 */

@Mapper
public interface CustomerDtoTransfer {

    CustomerDtoTransfer INSTANCE = Mappers.getMapper(CustomerDtoTransfer.class);

    /**
     *   将收货地址PO列表转DTO列表
     * @param list
     * @return
     */
    List<CustomerAddrDTO> toAddrDtoList(List<CustomerAddr> list);

    /**
     *   将地址转PO
     * @param dto
     * @return
     */

    CustomerAddr toAddrPo(CustomerAddrDTO dto);
}
